package android.slc.appbase.ui

import javafx.stage.Modality
import javafx.stage.StageStyle

open class AppStageLauncherConfigFeignSingle : AppStageLauncherConfigSimple() {

    companion object {

        fun newInstance(): AppStageLauncherConfig {
            return AppStageLauncherConfigSimple()
        }

        fun newInstanceOwnerFrom(): AppStageLauncherConfig {
            return AppStageLauncherConfigSimple().apply {
                this.ownerMode = true
                this.modality = Modality.WINDOW_MODAL
            }
        }

        fun newInstanceUndecorated(): AppStageLauncherConfig {
            return AppStageLauncherConfigSimple().apply {
                this.stageStyle = StageStyle.UNDECORATED
            }
        }
    }

    override fun isSyncStageParams(): Boolean {
        return true
    }

    override fun isApplySingleOwnerMechanism(): Boolean {
        return true
    }
}
